<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet"/>
<title>Register List page</title>
</head>
<body>


     <%! private String temp = "faculty";%>
  
  <nav class="navbar navbar-inverse" role="navigation">
  <ul class="nav navbar-nav">
      <li class="active"><a href="${pageContext.request.contextPath}/register/list.html">Job</a></li>
      
      <c:set var="str" value="${type}"/>   
		<jsp:useBean id="str" type="java.lang.String" />
		<c:if test='<%=str.equalsIgnoreCase("faculty")%>'>
      <li><a href="${pageContext.request.contextPath}/faculty/list.html">Faculty</a></li>
      <li><a href="${pageContext.request.contextPath}/student/list.html">Student</a></li>
      </c:if>
      
      <c:set var="strr" value="${type}"/>   
		<jsp:useBean id="strr" type="java.lang.String" />
		<c:if test='<%=str.equalsIgnoreCase("student")%>'>
    
      </c:if>
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
      <c:set var="add" value="${type}"/>   
		<jsp:useBean id="add" type="java.lang.String" />
		<c:if test='<%=str.equalsIgnoreCase("faculty")%>'>
      <li><a href="${pageContext.request.contextPath}/register/create.html">Add</a></li>
      </c:if>
    </ul>
</nav>
<div class="list-group">
  <a href="#" class="list-group-item active">
    Position
  </a>
<c:forEach var="position" items="${positionList}">
  <a href="${pageContext.request.contextPath}/register/view/${position.positionID}.html" class="list-group-item"> Position: ${position.title} | Department: ${position.department} | Type: ${position.type}</a>
</c:forEach>
</div>
</body>
</html>